#输入1个字符串，只保留汉字，最后输出
def keep_chinese(string):
    result = ""
    for char in string:
        if '\u4e00' <= char <= '\u9fff':
            result += char
    return result

string = input("请输入字符串：")
result = keep_chinese(string)
print(result)

